import { maoYanList} from "@/api/index"
const state = {
    movieLists:[]
}

const actions = {
    async movieList ({commit}) {
        // 调用接口，获取数据
        let result = await maoYanList()
        // console.log(result)
        commit('MOVIELIST',result.movie)
    }
}

const mutations = {
    MOVIELIST(state,movieList) {
      state.movieLists = movieList
    //   console.log(state.movieList)
    }
}

const getters = {}

export default {
    actions,
    mutations,
    state,
    getters
}